<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>自测系统</title>
    <link rel="stylesheet" href="//unpkg.com/layui@2.6.8/dist/css/layui.css">
</head>
<style>
 .ayui-nav-item{
     width: 100%;
   
 }
  .layui-nav-child{
    width: 100%;
    text-align: center;
 }
 .layui-nav-tree{
    width: 100%;
    text-align: center;
 }
</style>
<body>
    <script src="//unpkg.com/layui@2.6.8/dist/layui.js"></script>
<ul class="layui-nav layui-nav-tree layui-inline" lay-filter="demo" style="margin-right: 10px;">
        <li class="layui-nav-item">
          <a href="javascript:;">西综病例分析</a>
          <dl class="layui-nav-child">
            <dd><a href="/self-test/contents/zdgs.html">诊断公式</a></dd>
            <dd><a href="/self-test/contents/fzjc.html">辅助检查</a></dd>
            <dd><a href="/self-test/contents/zlcl.html">治疗策略</a></dd>
          </dl>
        </li>
        <li class="layui-nav-item">
          <a href="javascript:;">腿姐政治</a>
          <dl class="layui-nav-child">
            <dd><a href="/self-test/database/tdzc.html">土地政策</a></dd>
            <dd><a href="/self-test/database/zyhy.html">重要会议</a></dd>
            <dd><a href="/self-test/database/sjdy.html">史纲时间词与对应词</a></dd>
          </dl>
        </li>

        <li class="layui-nav-item">
          <a href="javascript:;">私人题库</a>
          <dl class="layui-nav-child">
            <dd><a href="/self-test/database/ceshi.html">正在努力更新中……</a></dd>
            <dd><a href="">正在努力更新中……</a></dd>
            <dd><a href="">正在努力更新中……</a></dd>
          </dl>
        </li>
        <li class="layui-nav-item"><a href="https://qm.qq.com/cgi-bin/qm/qr?k=AnpPsjQNOP912ydnqCxoNVQ6DQT_-Ar7&jump_from=webapi">欢迎共享题库</a></li>
        <li class="layui-nav-item"><a href="https://qm.qq.com/cgi-bin/qm/qr?k=AnpPsjQNOP912ydnqCxoNVQ6DQT_-Ar7&jump_from=webapi">如需私人题库请联系作者</a></li>
      </ul>
          <fieldset class="layui-elem-field layui-field-title" style="margin-top: 50px;">
  <legend>考研倒计时</legend>
</fieldset>
<blockquote class="layui-elem-quote" style="margin-top: 10px;">
  <div id="test2"></div>
</blockquote>
      <script>
layui.use('element', function(){
  var element = layui.element; //导航的hover效果、二级菜单等功能，需要依赖element模块
  
  //监听导航点击
  element.on('nav(demo)', function(elem){
    //console.log(elem)
    //layer.msg(elem.text());
  });
});
 layui.use(['util', 'laydate', 'layer'], function(){
  var util = layui.util
  ,laydate = layui.laydate
  ,$ = layui.$
  ,layer = layui.layer;
   
 var thisTimer, setCountdown = function(y, M, d, H, m, s){
    var endTime = new Date(y, M||0, d||1, H||0, m||0, s||0) //结束日期
    ,serverTime = new Date(); //假设为当前服务器时间，这里采用的是本地时间，实际使用一般是取服务端的
     
    clearTimeout(thisTimer);
    util.countdown(endTime, serverTime, function(date, serverTime, timer){
      var str = date[0] + '天' + date[1] + '时' +  date[2] + '分' + date[3] + '秒';
      lay('#test2').html(str);
      thisTimer = timer;
    });
  };
  setCountdown(2021,11,26,8,30);
  

  });
  
</script>
</body>
</html>